from yaami import Conn , Channel, Logger

	
conn = Conn()

logger = conn('logger',Logger)
channel = conn('channel',Channel)
#channel = conn('channel',Channel)
#logger.prompt(logger.notice,"%s\n" % channel.getbyname("Console/dsp"))

#for x in range(0,6):
#	logger.prompt(x,"%s\n" % x)
#for name in channel.getnames():
#	print channel.getbyname(name)

#logger.prompt(logger.notice,"Hola Mundo")

#print "exten\t\tdirecc\t\tdst\t\tdur"

#print channel.getbyname("Console/dsp")

print channel.get()

"""
for name in channel.getnames():
	c = channel.getbyname(name)
	bc = c.bridge
	
	dst = c.exten
	
	direcc = "<--"
	
	if len(c.exten) is 0:
		dst = bc.cdr.src
		direcc = "-->"
	
	print "%s\t\t%s\t\t%s\t\t%s\t\t%s" % (channel.n2e(c.name),direcc,dst,channel.hms(c.cdr.duration),c)
	
"""
